#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
AC_INIT([Naipax], [0.1.0], [henearkrxern@gmail.com])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE()

# Checks for programs.
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_LANG_CPLUSPLUS

# Check for perl
AC_PATH_PROG(PERL, perl)
if test -z "$PERL"
then
	AC_MSG_ERROR(Please install perl)
fi

# Checks For libraries.

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([sys/select.h poll.h pthread.h])
AC_CHECK_HEADERS([pcrecpp.h db_cxx.h ares.h confuse.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_TYPE(ssize_t, int32_t)
AC_CHECK_TYPE(uint64_t)

# Checks for library functions.
AC_CHECK_FUNCS([gethostbyname_r socket])

CXXFLAGS="-Wall -O3"
#CXXFLAGS="-Wall -g -dH -O0"
#CXXFLAGS="-Wall -pg"

AC_CONFIG_FILES([makefile include/makefile src/makefile test/makefile \
                          app/makefile app/naipax/makefile])

AC_OUTPUT
